package com.atguigu.gmall.common.constant;

import ch.qos.logback.classic.layout.TTLLLayout;

/**
 * @Description
 * @Return
 * @Author https://weiranyi.github.io
 * @Date Created in 2022-12-23 09:01
 **/
public class MqConst {
    // 交换机： server-order微服务的 order-event-exchange
    public static final String ORDER_EVENT_EXCHANGE = "order-event-exchange";
    // 队列： 微服务-事件-queue
    public static final String ORDER_DELAY_QUEUE = "order-delay-queue"; //延迟队列
    public static final String ORDER_DEAD_QUEUE = "order-dead-queue"; //死信队列
    public static final String ORDER_PAYED_QUEUE = "order-payed-queue"; //已支付队列
    //路由键:  微服务.事件
    public static final String ORDER_TIMEOUT_RK = "order.timeout";
    public static final String ORDER_CREAT_RK = "order.create";
    public static final Long ORDER_TTL = RedisConst.ORDER_TTL;

    // 死信交换机,路由key,认定为死信时间key
    public static final String X_DEAD_LATTER_EXCHANGE = "x-dead-letter-exchange";
    public static final String X_DEAD_LATTER_ROUTING_KEY = "x-dead-letter-routing-key";
    public static final String X_MESSAGE_TTL = "x-message-ttl";

    // 关闭订单错误时重试次数
    public static final Long ORDER_RETRY_COUNT = 3L;

    public static final String ORDER_PAYED_RK = "order.payed";

    // 【三方库存系统】
    public static final String WARE_STOCK_EXCHANGE = "exchange.direct.ware.stock";
    public static final String WARE_STOCK_RK = "ware.stock";

    // 秒杀相关的设置
    public static final String SECKILL_EVENT_EXCHANGE = "seckill-event-exchange"; //交换机
    public static final String SECKILL_LINED_UP_QUEUE = "seckill-linedup-queue"; // 排队
    public static final String SECKILL_QUEUE_RK = "seckill.linedup"; // 排队

    // 物流
    public static final String ORDER_EXPRESS_RK = "order.express"; //路由键
    public static final String ORDER_EXPRESS_QUEUE = "order-express-queue"; //快递队列
}
